GH-49684: [MATLAB] Introduce deprecation warnings for "legacy" Feather V1 functions featherread and featherwrite#49705
Conversation
|
|
|
+1 |
Co-authored-by: Sarah Gilmore <sgilmore@mathworks.com>
|
I recently switched to a new machine, and it looks like my Git email was configured incorrectly for the commits I made to this branch. I rebased, squashed the old commits, modified my email, and then force pushed to this branch. I'll wait for the CI checks to pass again and then merge this PR. Sorry for the confusion! |
|
+1 |
|
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 4eca507. There was 1 benchmark result with an error:
There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 56 possible false positives for unstable benchmarks that are known to sometimes produce them. |
…Feather V1 functions `featherread` and `featherwrite` (apache#49705) ### Rationale for this change In response to apache#49231 and https://lists.apache.org/thread/1npvnhjb1xwz09zh8vnd079zt2q4o08l, this pull request introduces deprecation warnings for the public MATLAB `featherread` and `featherwrite` APIs that allow reading and writing "legacy" Feather V1 files. The solution of introducing deprecation warnings follows the pyarrow approach proposed in apache#49590. **Examples** `featherread` ```matlab >> featherread("out.feather") Warning: Reading from Feather V1 files is deprecated. Use arrow.io.ipc.RecordBatchFileReader to read from Feather V2 (Arrow IPC) files. > In featherread (line 30) ``` `featherwrite` ```matlab >> featherwrite("out.feather", array2table(1)) Warning: Writing to Feather V1 files is deprecated. Use arrow.io.ipc.RecordBatchFileWriter to write to Feather V2 (Arrow IPC) files. > In featherread (line 31) ``` ### What changes are included in this PR? 1. Introduced a new warning with identifier `arrow:io:feather:v1:FeatherWriteDeprecated` when calling `featherwrite.m`. 2. Introduced a new warning with identifier `arrow:io:feather:v1:FeatherReadDeprecated` when calling `featherread.m`. ### Are these changes tested? Yes. 1. Updated `matlab/test/tfeather.m` to suppress `featherread` and `featherwrite` deprecation warnings. 2. Added two new test cases to `tfeather.m`: `VerifyFeatherReadDeprecationWarning` and `VerifyFeatherWriteDeprecationWarning`. These test cases verify that the expected deprecation warnings are issued as expected. 3. Updated `matlab/test/arrow/io/feather/tRoundTrip.m` to suppress `featherread` deprecation warnings. ### Are there any user-facing changes? Yes. 1. The `featherread` and `featherwrite` functions are user-facing. With these changes, deprecation warnings will be displayed when invoking either of these functions. **Note**: these warnings can be turned off in MATLAB by calling ` warning("off", "arrow:io:feather:v1:FeatherWriteDeprecated")` and `warning("off", "arrow:io:feather:v1:FeatherReadDeprecated")`. ### Future Directions 1. We may want to consider moving `featherread` and `featherwrite` into a package like `arrow.io.feather.v1.*` to mirror the rest of the mlarrow APIs. Alternatively, we could consider removing these functions entirely. ### Notes 1. Thank you @ sgilmore10 for your help with this pull request! * GitHub Issue: apache#49684 Lead-authored-by: Kevin Gurney <kgurney@mathworks.com> Co-authored-by: Sarah Gilmore <sgilmore@mathworks.com> Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
Rationale for this change
In response to #49231 and https://lists.apache.org/thread/1npvnhjb1xwz09zh8vnd079zt2q4o08l, this pull request introduces deprecation warnings for the public MATLAB
featherreadandfeatherwriteAPIs that allow reading and writing "legacy" Feather V1 files.The solution of introducing deprecation warnings follows the pyarrow approach proposed in #49590.
Examples
featherreadfeatherwriteWhat changes are included in this PR?
arrow:io:feather:v1:FeatherWriteDeprecatedwhen callingfeatherwrite.m.arrow:io:feather:v1:FeatherReadDeprecatedwhen callingfeatherread.m.Are these changes tested?
Yes.
matlab/test/tfeather.mto suppressfeatherreadandfeatherwritedeprecation warnings.tfeather.m:VerifyFeatherReadDeprecationWarningandVerifyFeatherWriteDeprecationWarning. These test cases verify that the expected deprecation warnings are issued as expected.matlab/test/arrow/io/feather/tRoundTrip.mto suppressfeatherreaddeprecation warnings.Are there any user-facing changes?
Yes.
featherreadandfeatherwritefunctions are user-facing. With these changes, deprecation warnings will be displayed when invoking either of these functions. Note: these warnings can be turned off in MATLAB by callingwarning("off", "arrow:io:feather:v1:FeatherWriteDeprecated")andwarning("off", "arrow:io:feather:v1:FeatherReadDeprecated").Future Directions
featherreadandfeatherwriteinto a package likearrow.io.feather.v1.*to mirror the rest of the mlarrow APIs. Alternatively, we could consider removing these functions entirely.Notes
featherreadandfeatherwrite#49684